package com.btpj.blog_server.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TagMapper {

    int deleteTagsByArticleId(@Param("articleId") Long articleId);

    List<Long> getTagIdsByTagNames(@Param("tagNames") String[] tagNames);

    int saveTags(@Param("tagNames") String[] tagNames);

    int addTagsToArticle(@Param("tagIds") List<Long> tagIds, @Param("articleId") Long articleId);
}
